//
//  KHHSearchNilPage.m
//  Travel
//
//  Created by dllo on 15/12/2.
//  Copyright © 2015年 doll. All rights reserved.
//

#import "KHHSearchNilPage.h"

@interface KHHSearchNilPage ()
@property (nonatomic, retain)UILabel *label;
@end

@implementation KHHSearchNilPage

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor colorWithRed:0.98 green:0.97 blue:0.93 alpha:1];
    [self addScreenEdgePan];
    
//    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithImage:[[UIImage imageNamed:@"fanhui"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] style:UIBarButtonItemStylePlain target:self action:@selector(backToLast)];
    
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"leftBack"] style:UIBarButtonItemStylePlain target:self action:@selector(backToLast)];
    
    

    self.label = [[UILabel alloc]initWithFrame:CGRectMake(20, 0, CWIDTH - 40, 60)];
    self.label.textColor = [UIColor darkGrayColor];
    self.label.center = self.view.center;
    self.label.numberOfLines = 2;
    self.label.textAlignment = NSTextAlignmentCenter;
    self.label.text = @"没有找到指定关键字  换个关键字输入吧O(∩_∩)O";
    [self.view addSubview:self.label];
}

#pragma mark-滑动手势1
- (void)addScreenEdgePan
{
    UIScreenEdgePanGestureRecognizer *screenEdgePan = [[UIScreenEdgePanGestureRecognizer alloc] initWithTarget:self action:@selector(presentLeftMenuViewController:)];
    screenEdgePan.edges = UIRectEdgeLeft;
    [self.view addGestureRecognizer:screenEdgePan];
    
}
#pragma mark-滑动手势2
-(void)presentLeftMenuViewController:(UIScreenEdgePanGestureRecognizer *)edge
{
    [self.navigationController popViewControllerAnimated:YES];
}

#pragma mark - 按钮触发方法
- (void)backToLast
{
    [self.navigationController popToRootViewControllerAnimated:YES];
    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
